<template>
  <router-view />
  <ProjectConfig :visible="Boolean(userState.openProjectList)" @close="closeProjectConfig" />
  
</template>

<script>
import ProjectConfig from './components/ProjectConfig.vue'
import userStore from './store/userStore.js'

export default {
  name: 'RouterApp',
  components: { ProjectConfig },
  setup() {
    const userState = userStore.getState()
    const closeProjectConfig = () => { userStore.set('openProjectList', '') }
    return { userState, closeProjectConfig }
  }
}
</script>

<style>
/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #c9ccd6;
}

#app {
  width: 100%;
  height: 100vh;
}

/* CSS变量定义 */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #4a90e2;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --light-gray: #f8f9fa;
  --medium-gray: #6c757d;
  --dark-gray: #495057;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}
</style>